<!DOCTYPE html>
<html lang=''>

<head>
  <meta charset='UTF-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=edge'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title>Document</title>
  <script src='./vue.js'></script>
</head>

<body>
  <div id='app'>
    <cell>
      <template v-slot:[name]>
        插槽内容
      </template>
    </cell>
    <button @click="name = 'b'">点击切换</button>
  </div>
</body>
<script>
  const app = Vue.createApp({
    data () {
      return {
        name: 'a'
      }
    },
  })

  app.component('cell', {
    template: `<div> <slot name='a'></slot> 11111111111111 <slot name='b'></slot> </div>`
  })

  app.mount('#app')
</script>

</html>
